package com.example.myapplication.bean;

import androidx.databinding.BaseObservable;
import androidx.databinding.Bindable;

public class ObservableUser extends BaseObservable {
    private  int age;
    private  String name;
    private  boolean isVisible;

    @Bindable
    public int getAge() {
        return age;
    }

    @Bindable
    public String getName() {
        return name;
    }

    @Bindable
    public boolean isVisible() {
        return isVisible;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void setVisible(boolean visible) {
        isVisible = visible;
    }

    public ObservableUser(int age, String name) {
        this.age = age;
        this.name = name;
    }

    @Override
    public String toString() {
        return "User{" +
                "age=" + age +
                ", name='" + name + '\'' +
                '}';
    }
}
